package fr.charlott.core.repository.model;

public enum Collection{
	
	ND("Non defini"), Attitude("Attitude"), Extreme("Extreme"), ExtremeBain("Extreme Bain"), Homme("Homme");
	
	private String nom;
	
	private Collection(String nom){
		this.nom = nom;
	}
	
	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}
	
	@Override
	public String toString(){
		return nom;
	}
	
	public static Collection getEnumForValue(String value){
		Collection[] values = Collection.values();
		String enumValue = null;
		for(Collection eachValue : values){
			enumValue = eachValue.toString();
			if (enumValue.equalsIgnoreCase(value)){
				return eachValue;
			}
		}
		return Collection.ND;
	}
}
